home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / tcl / History.man < prev    next >
Encoding:
Text File  |  1991-12-09  |  3.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4. Tcl_InitHistory       C Library Procedures        Tcl_InitHistory
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NNAAMMEE
  11.      Tcl_InitHistory, Tcl_RecordAndEval - procedures for managing
  12.      history list
  13.  
  14. SSYYNNOOPPSSIISS
  15.      ##iinncclluuddee <<ttccll..hh>>
  16.  
  17.      TTccll__IInniittHHiissttoorryy(_i_n_t_e_r_p)                                       |
  18.  
  19.      int
  20.      TTccll__RReeccoorrddAAnnddEEvvaall(_i_n_t_e_r_p, _c_m_d, _f_l_a_g_s)
  21.  
  22. AARRGGUUMMEENNTTSS
  23.      Tcl_Interp   *_i_n_t_e_r_p    (in)      Tcl interpreter  in  which
  24.                                        history   facilities   are
  25.                                        being used.
  26.  
  27.      char         *_c_m_d       (in)      Command  (or  sequence  of
  28.                                        commands) to execute.
  29.  
  30.      char         _f_l_a_g_s      (in)      Flags to pass to  TTccll__EEvvaall
  31.                                        (normally 0).  If -1, then
  32.                                        the command  is  not  exe-
  33.                                        cuted;       it's     just
  34.                                        recorded.
  35. _________________________________________________________________
  36.  
  37.  
  38. DDEESSCCRRIIPPTTIIOONN
  39.      The procedure TTccll__HHiissttoorryyIInniitt is invoked to enable the  his-  |
  40.      tory  facilities  in  an interpreter (by default there is no  |
  41.      hhiissttoorryy command in an interpreter).  After this command  has  |
  42.      been  executed  the  hhiissttoorryy  command  will  be available in  |
  43.      _i_n_t_e_r_p and  the  history  facilities  will  be  initialized.  |
  44.      TTccll__HHiissttoorryyIInniitt      is     invoked     automatically     by  |
  45.      TTccll__RReeccoorrddAAnnddEEvvaall, so it  need  not  be  invoked  explicitly  |
  46.      unless   the   hhiissttoorryy   command   is   to  be  used  before  |
  47.      TTccll__RReeccoorrddAAnnddEEvvaall has been called.
  48.  
  49.      TTccll__RReeccoorrddAAnnddEEvvaall is invoked to record a command on the his-
  50.      tory list and then execute it.  Programs that do not wish to
  51.      use the history mechanism should not call TTccll__RReeccoorrddAAnnddEEvvaall;
  52.      they    should    call   TTccll__EEvvaall   instead.    Furthermore,
  53.      TTccll__RReeccoorrddAAnnddEEvvaall should only be called with top-level  com-
  54.      mands  typed by the user, since the purpose of history is to
  55.      allow the user to re-issue recently-invoked commands.
  56.  
  57.      TTccll__RReeccoorrddAAnnddEEvvaall  does  three  things.   First,  it   calls
  58.      TTccll__HHiissttoorryyIInniitt  to  initialize  history for the interpreter
  59.      _i_n_t_e_r_p,  if  this  hasn't  already   been   done.    Second,
  60.  
  61.  
  62.  
  63. Sprite v1.0                                                     1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. Tcl_InitHistory       C Library Procedures        Tcl_InitHistory
  71.  
  72.  
  73.  
  74.      TTccll__RReeccoorrddAAnnddEEvvaall  saves  _c_o_m_m_a_n_d  in  the  history list for
  75.      _i_n_t_e_r_p, making a new event  to  hold  the  command.   Third,
  76.      TTccll__RReeccoorrddAAnnddEEvvaall  executes  the  command  by passing it and
  77.      _f_l_a_g_s to TTccll__EEvvaall.  If _f_l_a_g_s is -1 then only the  first  two
  78.      steps are taken;  the command will not be executed.
  79.  
  80.  
  81. KKEEYYWWOORRDDSS
  82.      command, event, execute, history, interpreter, record
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Sprite v1.0                                                     2
  130.  
  131.  
  132.  
  133.